package com.weixin.xplore.domain;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Participant {
    String name;
    Long personId;
    Long adViewCount;
    Long participationCount;
    Long membershipLevel;

    public Participant(Long personId,String name, Long adViewCount, Long participationCount, Long membershipLevel) {
        this.name = name;
        this.adViewCount = adViewCount;
        this.participationCount = participationCount;
        this.membershipLevel = membershipLevel;
        this.personId=personId;
    }

    // 计算权重
    public Long calculateWeight() {
        // 已看广告数权重系数
        int adViewWeight = 1;
        // 参与次数权重系数
        int participationWeight = 2;
        // 会员等级权重系数
        int membershipWeight = 3;

        return adViewCount * adViewWeight + participationCount * participationWeight + membershipLevel * membershipWeight;
    }
}
